﻿using System;
using System.Data;
using System.Drawing;
using System.Web.UI.WebControls;
using Telerik.Charting;

namespace WorkOrder.workBill
{
    public partial class AreaReport : System.Web.UI.Page
    {
        Business.AreaReport ar = new Business.AreaReport();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] == null || Session["UserID"].ToString() == "")
            {
                Session.Clear();
                ClientScript.RegisterClientScriptBlock(this.GetType(), "windowhref", "<script type='text/javascript'>alert('对不起，您还没有登录系统！');window.parent.location.href='../login.aspx';</script>");
            }
            if (!Page.IsPostBack)
            {
                ddlArea.Items.Clear();
                ddlArea.DataTextField = "area_name";
                ddlArea.DataValueField = "area_id";
                ddlArea.DataSource = ar.GetArea();
                ddlArea.DataBind();
                ddlArea.Items.Add(new ListItem("请选择", "0"));
                ddlArea.SelectedIndex = ddlArea.Items.Count - 1;

                txtYear.Value = DateTime.Now.Year.ToString();
                seleMonth.Value = DateTime.Now.Month.ToString();
            }
        }

        protected void btnSearch_ServerClick(object sender, EventArgs e)
        {
            if (ddlArea.SelectedValue=="0")
            {
                lblMsg.Text = "请选择区域！";
                lblMsg.ForeColor = Color.Red;
                return;
            }
            FillData();
        }

        private void FillData()
        {
            lblMsg.Text = "";
            string str = "";
            string str2 = "'" + DateTime.Now.Year + "-" + (DateTime.Now.Month - 1) + "-1 0:0:0' and '" +
                DateTime.Now.Year + "-" + (DateTime.Now.Month) + "-1 0:0:0'";
            #region 查询条件
            if (txtYear.Value.Trim() != "")
            {
                switch (seleMonth.Value)
                {
                    case "1":
                        str = txtYear.Value + "-1-1 0:0:0' and '" + txtYear.Value + "-1-31 23:59:59'";
                        str2 = string.Format("{0}-12-1 0:0:0' and '{1}-12-31 23:59:59'", (Convert.ToInt32(txtYear.Value) - 1), (Convert.ToInt32(txtYear.Value) - 1));
                        break;
                    case "2":
                        str = Convert.ToInt32(txtYear.Value)%4 == 0
                                  ? txtYear.Value + "-2-1 0:0:0' and '" + txtYear.Value + "-2-29 23:59:59'"
                                  : txtYear.Value + "-2-1 0:0:0' and '" + txtYear.Value + "-2-28 23:59:59'";
                        str2 = txtYear.Value + "-1-1 0:0:0' and '" + txtYear.Value + "-1-31 23:59:59'";
                        break;
                    case "3":
                        str = txtYear.Value + "-3-1 0:0:0' and '" + txtYear.Value + "-3-31 23:59:59'";
                        str2 = Convert.ToInt32(txtYear.Value)%4 == 0
                                   ? txtYear.Value + "-2-1 0:0:0' and '" + txtYear.Value + "-2-29 23:59:59'"
                                   : txtYear.Value + "-2-1 0:0:0' and '" + txtYear.Value + "-2-28 23:59:59'";
                        break;
                    case "4":
                        str = txtYear.Value + "-4-1 0:0:0' and '" + txtYear.Value + "-4-30 23:59:59'";
                        str2 = txtYear.Value + "-3-1 0:0:0' and '" + txtYear.Value + "-3-31 23:59:59'";
                        break;
                    case "5":
                        str = txtYear.Value + "-5-1 0:0:0' and '" + txtYear.Value + "-5-31 23:59:59'";
                        str2 = txtYear.Value + "-4-1 0:0:0' and '" + txtYear.Value + "-4-30 23:59:59'";
                        break;
                    case "6":
                        str = txtYear.Value + "-6-1 0:0:0' and '" + txtYear.Value + "-6-30 23:59:59'";
                        str2 = txtYear.Value + "-5-1 0:0:0' and '" + txtYear.Value + "-5-31 23:59:59'";
                        break;
                    case "7":
                        str = txtYear.Value + "-7-1 0:0:0' and '" + txtYear.Value + "-7-31 23:59:59'";
                        str2 = txtYear.Value + "-6-1 0:0:0' and '" + txtYear.Value + "-6-30 23:59:59'";
                        break;
                    case "8":
                        str = txtYear.Value + "-8-1 0:0:0' and '" + txtYear.Value + "-8-31 23:59:59'";
                        str2 = txtYear.Value + "-7-1 0:0:0' and '" + txtYear.Value + "-7-31 23:59:59'";
                        break;
                    case "9":
                        str = txtYear.Value + "-9-1 0:0:0' and '" + txtYear.Value + "-9-30 23:59:59'";
                        str2 = txtYear.Value + "-8-1 0:0:0' and '" + txtYear.Value + "-8-31 23:59:59'";
                        break;
                    case "10":
                        str = txtYear.Value + "-10-1 0:0:0' and '" + txtYear.Value + "-10-31 23:59:59'";
                        str2 = txtYear.Value + "-9-1 0:0:0' and '" + txtYear.Value + "-9-30 23:59:59'";
                        break;
                    case "11":
                        str = txtYear.Value + "-11-1 0:0:0' and '" + txtYear.Value + "-11-30 23:59:59'";
                        str2 = txtYear.Value + "-10-1 0:0:0' and '" + txtYear.Value + "-10-31 23:59:59'";
                        break;
                    case "12":
                        str = txtYear.Value + "-12-1 0:0:0' and '" + txtYear.Value + "-12-31 23:59:59'";
                        str2 = txtYear.Value + "-11-1 0:0:0' and '" + txtYear.Value + "-11-30 23:59:59'";
                        break;
                }
            }
            else
                return;
            #endregion
            DataTable tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8;
            int tmpInt1 = 0, tmpInt2 = 0, tmpInt3 = 0, tmpInt4 = 0, tmpInt5 = 0, tmpInt6 = 0, tmpInt7 = 0, tmpInt8 = 0;

            if (str != "")
            {
                tmp1 =
                    ar.GetNewCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str + " and A.finish_time between '" +
                                                 str); //本月新增客户完成
                tmp2 =
                    ar.GetAdjustCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str +
                                                    " and A.finish_time between '" + str); //本月调整客户完成
                tmp3 =
                    ar.GetCancelCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str +
                                                    " and A.finish_time between '" + str); //本月取消客户完成
                tmp4 =
                    ar.GetNewCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str2 + " and A.finish_time between '" +
                                                 str2); //上月新增客户完成
                tmp5 =
                    ar.GetAdjustCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str2 +
                                                    " and A.finish_time between '" + str2); //上月调整客户完成
                tmp6 =
                    ar.GetCancelCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str2 +
                                                    " and A.finish_time between '" + str2); //上月取消客户完成
                tmp7 =
                    ar.GetTotalCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str + " and A.finish_time between '" +
                                                   str); //本月总计完成
                tmp8 =
                    ar.GetTotalCustomersIsFinished(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str2 +
                                                   " and A.finish_time between '" + str2); //上月总计完成

                #region 第四个表tab4 客户完成数

                for (int i = 2; i <= 7; i++)
                {
                    #region 填0

                    tab4.Rows[i].Cells[1].InnerText = "0";
                    tab4.Rows[i].Cells[2].InnerText = "0";
                    tab4.Rows[i].Cells[3].InnerText = "0 %";
                    tab4.Rows[i].Cells[4].InnerText = "0";
                    tab4.Rows[i].Cells[5].InnerText = "0";
                    tab4.Rows[i].Cells[6].InnerText = "0 %";
                    tab4.Rows[i].Cells[7].InnerText = "0";
                    tab4.Rows[i].Cells[8].InnerText = "0";
                    tab4.Rows[i].Cells[9].InnerText = "0 %";
                    tab4.Rows[i].Cells[10].InnerText = "0";
                    tab4.Rows[i].Cells[11].InnerText = "0";
                    tab4.Rows[i].Cells[12].InnerText = "0 %";

                    #endregion

                    #region 填充数据

                    for (int j = 0; j < tmp1.Rows.Count; j++) //本月新增客户完成
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp1.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[1].InnerText = tmp1.Rows[j][1].ToString();
                            tmpInt1 = tmpInt1 + Convert.ToInt32(tmp1.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp2.Rows.Count; j++) //本月调整客户完成
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp2.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[4].InnerText = tmp2.Rows[j][1].ToString();
                            tmpInt2 = tmpInt2 + Convert.ToInt32(tmp2.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp3.Rows.Count; j++) //本月取消客户完成
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp3.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[7].InnerText = tmp3.Rows[j][1].ToString();
                            tmpInt3 = tmpInt3 + Convert.ToInt32(tmp3.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp4.Rows.Count; j++) //上月新增客户完成
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp4.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[2].InnerText = tmp4.Rows[j][1].ToString();
                            tmpInt4 = tmpInt4 + Convert.ToInt32(tmp4.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp5.Rows.Count; j++) //上月调整客户完成
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp5.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[5].InnerText = tmp5.Rows[j][1].ToString();
                            tmpInt5 = tmpInt5 + Convert.ToInt32(tmp5.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp6.Rows.Count; j++) //上月取消客户完成
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp6.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[8].InnerText = tmp6.Rows[j][1].ToString();
                            tmpInt6 = tmpInt6 + Convert.ToInt32(tmp6.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp7.Rows.Count; j++) //本月总计客户
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp7.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[10].InnerText = tmp7.Rows[j][1].ToString();
                            tmpInt7 = tmpInt7 + Convert.ToInt32(tmp7.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp8.Rows.Count; j++) //上月总计客户
                    {
                        if (tab4.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp8.Rows[j][0].ToString())
                        {
                            tab4.Rows[i].Cells[11].InnerText = tmp8.Rows[j][1].ToString();
                            tmpInt8 = tmpInt8 + Convert.ToInt32(tmp8.Rows[j][1]);
                        }
                    }
                    if (Convert.ToInt32(tab4.Rows[i].Cells[2].InnerText) != 0) //新增增幅
                        tab4.Rows[i].Cells[3].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab4.Rows[i].Cells[1].InnerText) -
                                     Convert.ToDecimal(tab4.Rows[i].Cells[2].InnerText))/
                                    Convert.ToDecimal(tab4.Rows[i].Cells[2].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab4.Rows[i].Cells[5].InnerText) != 0) //调整增幅
                        tab4.Rows[i].Cells[6].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab4.Rows[i].Cells[4].InnerText) -
                                     Convert.ToDecimal(tab4.Rows[i].Cells[5].InnerText))/
                                    Convert.ToDecimal(tab4.Rows[i].Cells[5].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab4.Rows[i].Cells[8].InnerText) != 0) //取消增幅
                        tab4.Rows[i].Cells[9].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab4.Rows[i].Cells[7].InnerText) -
                                     Convert.ToDecimal(tab4.Rows[i].Cells[8].InnerText))/
                                    Convert.ToDecimal(tab4.Rows[i].Cells[8].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab4.Rows[i].Cells[11].InnerText) != 0) //总计增幅
                        tab4.Rows[i].Cells[12].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab4.Rows[i].Cells[10].InnerText) -
                                     Convert.ToDecimal(tab4.Rows[i].Cells[11].InnerText))/
                                    Convert.ToDecimal(tab4.Rows[i].Cells[11].InnerText), 4)*100, 2) + " %";

                    #endregion
                }

                #region 填充总计行

                tab4.Rows[8].Cells[1].InnerText = tmpInt1.ToString();
                tab4.Rows[8].Cells[4].InnerText = tmpInt2.ToString();
                tab4.Rows[8].Cells[7].InnerText = tmpInt3.ToString();
                tab4.Rows[8].Cells[2].InnerText = tmpInt4.ToString();
                tab4.Rows[8].Cells[5].InnerText = tmpInt5.ToString();
                tab4.Rows[8].Cells[8].InnerText = tmpInt6.ToString();
                tab4.Rows[8].Cells[3].InnerText = tmpInt4 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt1 - tmpInt4)/(decimal) tmpInt4, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab4.Rows[8].Cells[6].InnerText = tmpInt5 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt2 - tmpInt5)/(decimal) tmpInt5, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab4.Rows[8].Cells[9].InnerText = tmpInt6 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt3 - tmpInt6)/(decimal) tmpInt6, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab4.Rows[8].Cells[10].InnerText = tmpInt7.ToString();
                tab4.Rows[8].Cells[11].InnerText = tmpInt8.ToString();
                tab4.Rows[8].Cells[12].InnerText = tmpInt8 != 0
                                                       ? Math.Round(
                                                           Math.Round((tmpInt7 - tmpInt8)/(decimal) tmpInt8, 4)*
                                                           100, 2) + " %"
                                                       : 0.ToString();

                #endregion

                #endregion

                tmp1 =
                    ar.GetNewCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str);
                //本月新增客户
                tmp2 =
                    ar.GetAdjustCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" +
                                          str); //本月调整客户
                tmp3 =
                    ar.GetCancelCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" +
                                          str); //本月取消客户
                tmp4 =
                    ar.GetNewCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                              " and A.request_time between '" + str); //本月新增支撑次数
                tmp5 =
                    ar.GetAdjustCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                                 " and A.request_time between '" + str); //本月调整支撑次数
                tmp6 =
                    ar.GetCancelCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                                 " and A.request_time between '" + str); //本月取消支撑次数
                tmp7 =
                    ar.GetTotalCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" +
                                         str); //本月客户总计
                tmp8 =
                    ar.GetTotalCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                                " and A.request_time between '" + str); //本月支撑次数总计

                tmpInt1 = 0;
                tmpInt2 = 0;
                tmpInt3 = 0;
                tmpInt7 = 0;
                tmpInt4 = 0;
                tmpInt5 = 0;
                tmpInt6 = 0;
                tmpInt8 = 0;

                #region 第一个表tab1 本月业务工单分析 客户数 支撑次数
                for (int j = 1; j <= 16; j++) 
                    tab1.Rows[8].Cells[j].InnerText = "0";
                for (int i = 2; i <= 7; i++)
                {
                    #region 先将所有单元格填0
                    for (int j = 1; j <= 16; j++)
                    {
                        tab1.Rows[i].Cells[j].InnerText = "0";
                    }

                    #endregion

                    #region 填充数据

                    for (int j = 0; j < tmp1.Rows.Count; j++) //新增客户
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp1.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[1].InnerText = tmp1.Rows[j][1].ToString();
                            tmpInt1 = tmpInt1 + Convert.ToInt32(tmp1.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp2.Rows.Count; j++) //调整客户
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp2.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[5].InnerText = tmp2.Rows[j][1].ToString();
                            tmpInt2 = tmpInt2 + Convert.ToInt32(tmp2.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp3.Rows.Count; j++) //取消客户
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp3.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[9].InnerText = tmp3.Rows[j][1].ToString();
                            tmpInt3 = tmpInt3 + Convert.ToInt32(tmp3.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp4.Rows.Count; j++) //新增支撑次数
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp4.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[2].InnerText = tmp4.Rows[j][1].ToString();
                            tmpInt4 = tmpInt4 + Convert.ToInt32(tmp4.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp5.Rows.Count; j++) //调整支撑次数
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp5.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[6].InnerText = tmp5.Rows[j][1].ToString();
                            tmpInt5 = tmpInt5 + Convert.ToInt32(tmp5.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp6.Rows.Count; j++) //取消支撑次数
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp6.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[10].InnerText = tmp6.Rows[j][1].ToString();
                            tmpInt6 = tmpInt6 + Convert.ToInt32(tmp6.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp7.Rows.Count; j++) //总计客户
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp7.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[13].InnerText = tmp7.Rows[j][1].ToString();
                            tmpInt7 = tmpInt7 + Convert.ToInt32(tmp7.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp8.Rows.Count; j++) //总计支撑次数
                    {
                        if (tab1.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp8.Rows[j][0].ToString())
                        {
                            tab1.Rows[i].Cells[14].InnerText = tmp8.Rows[j][1].ToString();
                            tmpInt8 = tmpInt8 + Convert.ToInt32(tmp8.Rows[j][1]);
                        }
                    }

                    #endregion
                }

                #region 填充总计行

                tab1.Rows[8].Cells[1].InnerText = tmpInt1.ToString();
                tab1.Rows[8].Cells[5].InnerText = tmpInt2.ToString();
                tab1.Rows[8].Cells[9].InnerText = tmpInt3.ToString();
                tab1.Rows[8].Cells[2].InnerText = tmpInt4.ToString();
                tab1.Rows[8].Cells[6].InnerText = tmpInt5.ToString();
                tab1.Rows[8].Cells[10].InnerText = tmpInt6.ToString();
                tab1.Rows[8].Cells[13].InnerText = tmpInt7.ToString();
                tab1.Rows[8].Cells[14].InnerText = tmpInt8.ToString();

                #endregion

                #endregion

                tmpInt4 = 0;
                tmpInt5 = 0;
                tmpInt6 = 0;
                tmpInt8 = 0;

                #region 第三个表tab3 支撑次数统计本月数据

                for (int i = 2; i <= 7; i++)
                {
                    #region 填0

                    tab3.Rows[i].Cells[1].InnerText = "0";
                    tab3.Rows[i].Cells[2].InnerText = "0";
                    tab3.Rows[i].Cells[3].InnerText = "0 %";
                    tab3.Rows[i].Cells[4].InnerText = "0";
                    tab3.Rows[i].Cells[5].InnerText = "0";
                    tab3.Rows[i].Cells[6].InnerText = "0 %";
                    tab3.Rows[i].Cells[7].InnerText = "0";
                    tab3.Rows[i].Cells[8].InnerText = "0";
                    tab3.Rows[i].Cells[9].InnerText = "0 %";
                    tab3.Rows[i].Cells[10].InnerText = "0";
                    tab3.Rows[i].Cells[11].InnerText = "0";
                    tab3.Rows[i].Cells[12].InnerText = "0 %";

                    #endregion

                    #region 填充数据

                    for (int j = 0; j < tmp4.Rows.Count; j++) //本月新增客户支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp4.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[1].InnerText = tmp4.Rows[j][1].ToString();
                            tmpInt4 = tmpInt4 + Convert.ToInt32(tmp4.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp5.Rows.Count; j++) //本月调整客户支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp5.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[4].InnerText = tmp5.Rows[j][1].ToString();
                            tmpInt5 = tmpInt5 + Convert.ToInt32(tmp5.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp6.Rows.Count; j++) //本月取消客户支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp6.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[7].InnerText = tmp6.Rows[j][1].ToString();
                            tmpInt6 = tmpInt6 + Convert.ToInt32(tmp6.Rows[j][1]);
                        }
                    }

                    for (int j = 0; j < tmp8.Rows.Count; j++) //本月总计客户支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp8.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[10].InnerText = tmp8.Rows[j][1].ToString();
                            tmpInt8 = tmpInt8 + Convert.ToInt32(tmp8.Rows[j][1]);
                        }
                    }

                    #endregion
                }

                #region 填充总计行

                tab3.Rows[8].Cells[1].InnerText = tmpInt4.ToString();
                tab3.Rows[8].Cells[4].InnerText = tmpInt5.ToString();
                tab3.Rows[8].Cells[7].InnerText = tmpInt6.ToString();
                tab3.Rows[8].Cells[10].InnerText = tmpInt8.ToString();

                #endregion

                #endregion

                tmp4 =
                    ar.GetNewCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" + str2);
                    //上月新增客户
                tmp5 =
                    ar.GetAdjustCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" +
                                          str2); //上月调整客户
                tmp6 =
                    ar.GetCancelCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" +
                                          str2); //上月取消客户
                tmp8 =
                    ar.GetTotalCustomers(" and A.area_id=" + ddlArea.SelectedValue + " and A.task_time between '" +
                                         str2); //上月客户总计
                tmpInt4 = 0;
                tmpInt5 = 0;
                tmpInt6 = 0;
                tmpInt8 = 0;

                #region 第二个表tab2 客户需求数统计

                for (int i = 2; i <= 7; i++)
                {
                    #region 填0

                    tab2.Rows[i].Cells[1].InnerText = "0";
                    tab2.Rows[i].Cells[2].InnerText = "0";
                    tab2.Rows[i].Cells[3].InnerText = "0 %";
                    tab2.Rows[i].Cells[4].InnerText = "0";
                    tab2.Rows[i].Cells[5].InnerText = "0";
                    tab2.Rows[i].Cells[6].InnerText = "0 %";
                    tab2.Rows[i].Cells[7].InnerText = "0";
                    tab2.Rows[i].Cells[8].InnerText = "0";
                    tab2.Rows[i].Cells[9].InnerText = "0 %";
                    tab2.Rows[i].Cells[10].InnerText = "0";
                    tab2.Rows[i].Cells[11].InnerText = "0";
                    tab2.Rows[i].Cells[12].InnerText = "0 %";

                    #endregion

                    #region 填充数据

                    for (int j = 0; j < tmp1.Rows.Count; j++) //本月新增客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp1.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[1].InnerText = tmp1.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp2.Rows.Count; j++) //本月调整客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp2.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[4].InnerText = tmp2.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp3.Rows.Count; j++) //本月取消客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp3.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[7].InnerText = tmp3.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp4.Rows.Count; j++) //上月新增客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp4.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[2].InnerText = tmp4.Rows[j][1].ToString();
                            tmpInt4 = tmpInt4 + Convert.ToInt32(tmp4.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp5.Rows.Count; j++) //上月调整客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp5.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[5].InnerText = tmp5.Rows[j][1].ToString();
                            tmpInt5 = tmpInt5 + Convert.ToInt32(tmp5.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp6.Rows.Count; j++) //上月取消客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp6.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[8].InnerText = tmp6.Rows[j][1].ToString();
                            tmpInt6 = tmpInt6 + Convert.ToInt32(tmp6.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp7.Rows.Count; j++) //本月总计客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp7.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[10].InnerText = tmp7.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp8.Rows.Count; j++) //上月总计客户
                    {
                        if (tab2.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp8.Rows[j][0].ToString())
                        {
                            tab2.Rows[i].Cells[11].InnerText = tmp8.Rows[j][1].ToString();
                            tmpInt8 = tmpInt8 + Convert.ToInt32(tmp8.Rows[j][1]);
                        }
                    }
                    if (Convert.ToInt32(tab2.Rows[i].Cells[2].InnerText) != 0) //新增增幅
                        tab2.Rows[i].Cells[3].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab2.Rows[i].Cells[1].InnerText) -
                                     Convert.ToDecimal(tab2.Rows[i].Cells[2].InnerText))/
                                    Convert.ToDecimal(tab2.Rows[i].Cells[2].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab2.Rows[i].Cells[5].InnerText) != 0) //调整增幅
                        tab2.Rows[i].Cells[6].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab2.Rows[i].Cells[4].InnerText) -
                                     Convert.ToDecimal(tab2.Rows[i].Cells[5].InnerText))/
                                    Convert.ToDecimal(tab2.Rows[i].Cells[5].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab2.Rows[i].Cells[8].InnerText) != 0) //取消增幅
                        tab2.Rows[i].Cells[9].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab2.Rows[i].Cells[7].InnerText) -
                                     Convert.ToDecimal(tab2.Rows[i].Cells[8].InnerText))/
                                    Convert.ToDecimal(tab2.Rows[i].Cells[8].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab2.Rows[i].Cells[11].InnerText) != 0) //总计增幅
                        tab2.Rows[i].Cells[12].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab2.Rows[i].Cells[10].InnerText) -
                                     Convert.ToDecimal(tab2.Rows[i].Cells[11].InnerText))/
                                    Convert.ToDecimal(tab2.Rows[i].Cells[11].InnerText), 4)*100, 2) + " %";

                    #endregion
                }

                #region 填充总计行

                tab2.Rows[8].Cells[1].InnerText = tmpInt1.ToString();
                tab2.Rows[8].Cells[4].InnerText = tmpInt2.ToString();
                tab2.Rows[8].Cells[7].InnerText = tmpInt3.ToString();
                tab2.Rows[8].Cells[2].InnerText = tmpInt4.ToString();
                tab2.Rows[8].Cells[5].InnerText = tmpInt5.ToString();
                tab2.Rows[8].Cells[8].InnerText = tmpInt6.ToString();
                tab2.Rows[8].Cells[3].InnerText = tmpInt4 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt1 - tmpInt4)/(decimal) tmpInt4, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab2.Rows[8].Cells[6].InnerText = tmpInt5 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt2 - tmpInt5)/(decimal) tmpInt5, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab2.Rows[8].Cells[9].InnerText = tmpInt6 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt3 - tmpInt6)/(decimal) tmpInt6, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab2.Rows[8].Cells[10].InnerText = tmpInt7.ToString();
                tab2.Rows[8].Cells[11].InnerText = tmpInt8.ToString();
                tab2.Rows[8].Cells[12].InnerText = tmpInt8 != 0
                                                       ? Math.Round(
                                                           Math.Round((tmpInt7 - tmpInt8)/(decimal) tmpInt8, 4)*
                                                           100, 2) + " %"
                                                       : 0.ToString();

                #endregion


                //chartSeries.AddItem();
                int tmp = RadChart6.Series.Count;

                #endregion

                #region 第五个表tab5 提单质量分析的本月客户数据);

                for (int i = 2; i <= 7; i++)
                {
                    #region 填0

                    tab5.Rows[i].Cells[1].InnerText = "0";
                    tab5.Rows[i].Cells[2].InnerText = "0";
                    tab5.Rows[i].Cells[3].InnerText = "0 %";
                    tab5.Rows[i].Cells[4].InnerText = "0";
                    tab5.Rows[i].Cells[5].InnerText = "0";
                    tab5.Rows[i].Cells[6].InnerText = "0 %";
                    tab5.Rows[i].Cells[7].InnerText = "0";
                    tab5.Rows[i].Cells[8].InnerText = "0";
                    tab5.Rows[i].Cells[9].InnerText = "0 %";
                    tab5.Rows[i].Cells[10].InnerText = "0";
                    tab5.Rows[i].Cells[11].InnerText = "0";
                    tab5.Rows[i].Cells[12].InnerText = "0 %";

                    #endregion

                    #region 填充数据

                    for (int j = 0; j < tmp1.Rows.Count; j++) //本月新增客户
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp1.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[1].InnerText = tmp1.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp2.Rows.Count; j++) //本月调整客户
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp2.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[4].InnerText = tmp2.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp3.Rows.Count; j++) //本月取消客户
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp3.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[7].InnerText = tmp3.Rows[j][1].ToString();
                        }
                    }
                    for (int j = 0; j < tmp7.Rows.Count; j++) //本月总计客户
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp7.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[10].InnerText = tmp7.Rows[j][1].ToString();
                        }
                    }

                    #endregion
                }

                #region 填充总计行

                tab5.Rows[8].Cells[1].InnerText = tmpInt1.ToString();
                tab5.Rows[8].Cells[4].InnerText = tmpInt2.ToString();
                tab5.Rows[8].Cells[7].InnerText = tmpInt3.ToString();
                tab5.Rows[8].Cells[10].InnerText = tmpInt7.ToString();

                #endregion

                #endregion

                tmp1.Dispose();
                tmp2.Dispose();
                tmp3.Dispose();
                tmp7.Dispose();

                tmp4 =
                    ar.GetNewCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                              " and A.request_time between '" + str2); //上月新增支撑次数
                tmp5 =
                    ar.GetAdjustCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                                 " and A.request_time between '" + str2); //上月调整支撑次数
                tmp6 =
                    ar.GetCancelCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                                 " and A.request_time between '" + str2); //上月取消支撑次数
                tmp8 =
                    ar.GetTotalCustomersNumbers(" and C.area_id=" + ddlArea.SelectedValue +
                                                " and A.request_time between '" + str2); //上月支撑次数总计
                tmpInt4 = 0;
                tmpInt5 = 0;
                tmpInt6 = 0;
                tmpInt8 = 0;

                #region 第三个表tab3 支撑次数统计上月数据

                for (int i = 2; i <= 7; i++)
                {
                    #region 填充数据

                    for (int j = 0; j < tmp4.Rows.Count; j++) //上月新增支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp4.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[2].InnerText = tmp4.Rows[j][1].ToString();
                            tmpInt4 = tmpInt4 + Convert.ToInt32(tmp4.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp5.Rows.Count; j++) //上月调整支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp5.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[5].InnerText = tmp5.Rows[j][1].ToString();
                            tmpInt5 = tmpInt5 + Convert.ToInt32(tmp5.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp6.Rows.Count; j++) //上月取消支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp6.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[8].InnerText = tmp6.Rows[j][1].ToString();
                            tmpInt6 = tmpInt6 + Convert.ToInt32(tmp6.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp8.Rows.Count; j++) //上月总计支撑次数
                    {
                        if (tab3.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp8.Rows[j][0].ToString())
                        {
                            tab3.Rows[i].Cells[11].InnerText = tmp8.Rows[j][1].ToString();
                            tmpInt8 = tmpInt8 + Convert.ToInt32(tmp8.Rows[j][1]);
                        }
                    }
                    if (Convert.ToInt32(tab3.Rows[i].Cells[2].InnerText) != 0) //新增增幅
                        tab3.Rows[i].Cells[3].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab3.Rows[i].Cells[1].InnerText) -
                                     Convert.ToDecimal(tab3.Rows[i].Cells[2].InnerText))/
                                    Convert.ToDecimal(tab3.Rows[i].Cells[2].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab3.Rows[i].Cells[5].InnerText) != 0) //调整增幅
                        tab3.Rows[i].Cells[6].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab3.Rows[i].Cells[4].InnerText) -
                                     Convert.ToDecimal(tab3.Rows[i].Cells[5].InnerText))/
                                    Convert.ToDecimal(tab3.Rows[i].Cells[5].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab3.Rows[i].Cells[8].InnerText) != 0) //取消增幅
                        tab3.Rows[i].Cells[9].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab3.Rows[i].Cells[7].InnerText) -
                                     Convert.ToDecimal(tab3.Rows[i].Cells[8].InnerText))/
                                    Convert.ToDecimal(tab3.Rows[i].Cells[8].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab3.Rows[i].Cells[11].InnerText) != 0) //总计增幅
                        tab3.Rows[i].Cells[12].InnerText =
                            Math.Round(
                                Math.Round(
                                    (Convert.ToDecimal(tab3.Rows[i].Cells[10].InnerText) -
                                     Convert.ToDecimal(tab3.Rows[i].Cells[11].InnerText))/
                                    Convert.ToDecimal(tab3.Rows[i].Cells[11].InnerText), 4)*100, 2) + " %";

                    #endregion
                }

                #region 填充总计行

                tmpInt1 = Convert.ToInt32(tab3.Rows[8].Cells[1].InnerText);
                tmpInt2 = Convert.ToInt32(tab3.Rows[8].Cells[4].InnerText);
                tmpInt3 = Convert.ToInt32(tab3.Rows[8].Cells[7].InnerText);
                tmpInt7 = Convert.ToInt32(tab3.Rows[8].Cells[10].InnerText);

                tab3.Rows[8].Cells[2].InnerText = tmpInt4.ToString();
                tab3.Rows[8].Cells[5].InnerText = tmpInt5.ToString();
                tab3.Rows[8].Cells[8].InnerText = tmpInt6.ToString();
                tab3.Rows[8].Cells[3].InnerText = tmpInt4 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt1 - tmpInt4)/(decimal) tmpInt4, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab3.Rows[8].Cells[6].InnerText = tmpInt5 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt2 - tmpInt5)/(decimal) tmpInt5, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab3.Rows[8].Cells[9].InnerText = tmpInt6 != 0
                                                      ? Math.Round(
                                                          Math.Round((tmpInt3 - tmpInt6)/(decimal) tmpInt6, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab3.Rows[8].Cells[11].InnerText = tmpInt8.ToString();
                tab3.Rows[8].Cells[12].InnerText = tmpInt8 != 0
                                                       ? Math.Round(
                                                           Math.Round((tmpInt7 - tmpInt8)/(decimal) tmpInt8, 4)*
                                                           100, 2) + " %"
                                                       : 0.ToString();

                #endregion

                #endregion

                tmp4 = ar.GetNewReturnBill("'" + str + " and A.area_id=" + ddlArea.SelectedValue); //本月新增退单
                tmp5 = ar.GetAdjustReturnBill("'" + str + " and A.area_id=" + ddlArea.SelectedValue); //本月调整退单
                tmp6 = ar.GetCancelReturnBill("'" + str + " and A.area_id=" + ddlArea.SelectedValue); //本月取消退单
                tmp8 = ar.GetTotalReturnBill("'" + str + " and A.area_id=" + ddlArea.SelectedValue); //本月总计退单
                tmpInt4 = 0;
                tmpInt5 = 0;
                tmpInt6 = 0;
                tmpInt8 = 0;

                #region 第五个表tab5 提单质量分析退单数据

                for (int i = 2; i <= 7; i++)
                {
                    #region 填充数据

                    for (int j = 0; j < tmp4.Rows.Count; j++) //新增退单
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp4.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[2].InnerText = tmp4.Rows[j][1].ToString();
                            tmpInt4 = tmpInt4 + Convert.ToInt32(tmp4.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp5.Rows.Count; j++) //调整退单
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp5.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[5].InnerText = tmp5.Rows[j][1].ToString();
                            tmpInt5 = tmpInt5 + Convert.ToInt32(tmp5.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp6.Rows.Count; j++) //取消退单
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp6.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[8].InnerText = tmp6.Rows[j][1].ToString();
                            tmpInt6 = tmpInt6 + Convert.ToInt32(tmp6.Rows[j][1]);
                        }
                    }
                    for (int j = 0; j < tmp8.Rows.Count; j++) //总计退单
                    {
                        if (tab5.Rows[i].Cells[0].InnerText.Trim().Replace("\r\n", "").Trim() ==
                            tmp8.Rows[j][0].ToString())
                        {
                            tab5.Rows[i].Cells[11].InnerText = tmp8.Rows[j][1].ToString();
                            tmpInt8 = tmpInt8 + Convert.ToInt32(tmp8.Rows[j][1]);
                        }
                    }
                    if (Convert.ToInt32(tab5.Rows[i].Cells[1].InnerText) != 0) //新增退单率
                        tab5.Rows[i].Cells[3].InnerText =
                            Math.Round(
                                Math.Round(
                                    Convert.ToDecimal(tab5.Rows[i].Cells[2].InnerText)/
                                    Convert.ToDecimal(tab5.Rows[i].Cells[1].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab5.Rows[i].Cells[4].InnerText) != 0) //调整退单率
                        tab5.Rows[i].Cells[6].InnerText =
                            Math.Round(
                                Math.Round(
                                    Convert.ToDecimal(tab5.Rows[i].Cells[5].InnerText)/
                                    Convert.ToDecimal(tab5.Rows[i].Cells[4].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab5.Rows[i].Cells[7].InnerText) != 0) //取消退单率
                        tab5.Rows[i].Cells[9].InnerText =
                            Math.Round(
                                Math.Round(
                                    Convert.ToDecimal(tab5.Rows[i].Cells[8].InnerText)/
                                    Convert.ToDecimal(tab5.Rows[i].Cells[7].InnerText), 4)*100, 2) + " %";
                    if (Convert.ToInt32(tab5.Rows[i].Cells[10].InnerText) != 0) //总计退单率
                        tab5.Rows[i].Cells[12].InnerText =
                            Math.Round(
                                Math.Round(
                                    Convert.ToDecimal(tab5.Rows[i].Cells[11].InnerText)/
                                    Convert.ToDecimal(tab5.Rows[i].Cells[10].InnerText), 4)*100, 2) + " %";

                    #endregion
                }

                #region 填充总计行

                tmpInt1 = Convert.ToInt32(tab5.Rows[8].Cells[1].InnerText);
                tmpInt2 = Convert.ToInt32(tab5.Rows[8].Cells[4].InnerText);
                tmpInt3 = Convert.ToInt32(tab5.Rows[8].Cells[7].InnerText);
                tmpInt7 = Convert.ToInt32(tab5.Rows[8].Cells[10].InnerText);

                tab5.Rows[8].Cells[2].InnerText = tmpInt4.ToString();
                tab5.Rows[8].Cells[5].InnerText = tmpInt5.ToString();
                tab5.Rows[8].Cells[8].InnerText = tmpInt6.ToString();
                tab5.Rows[8].Cells[11].InnerText = tmpInt8.ToString();
                tab5.Rows[8].Cells[3].InnerText = tmpInt1 != 0
                                                      ? Math.Round(
                                                          Math.Round((decimal) tmpInt4/(decimal) tmpInt1, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab5.Rows[8].Cells[6].InnerText = tmpInt2 != 0
                                                      ? Math.Round(
                                                          Math.Round((decimal) tmpInt5/(decimal) tmpInt2, 4)*
                                                          100, 2) + " %"
                                                      : 0.ToString();
                tab5.Rows[8].Cells[9].InnerText = tmpInt3 != 0
                                                      ? string.Format("{0} %", Math.Round(
                                                          Math.Round((decimal) tmpInt6/(decimal) tmpInt3, 4)*
                                                          100, 2))
                                                      : 0.ToString();
                tab5.Rows[8].Cells[12].InnerText = tmpInt7 != 0
                                                       ? string.Format("{0} %", Math.Round(
                                                           Math.Round((decimal) tmpInt8/(decimal) tmpInt7, 4)*
                                                           100, 2))
                                                       : 0.ToString();

                #endregion

                #endregion

                tmp4.Dispose();
                tmp5.Dispose();
                tmp6.Dispose();
                tmp8.Dispose();

                #region 第一个表tab1 工单业务分析 已完成数
                for (int i = 2; i <= 8; i++)
                {
                    tab1.Rows[i].Cells[3].InnerText = tab4.Rows[i].Cells[1].InnerText;
                    tab1.Rows[i].Cells[7].InnerText = tab4.Rows[i].Cells[4].InnerText;
                    tab1.Rows[i].Cells[11].InnerText = tab4.Rows[i].Cells[7].InnerText;
                    tab1.Rows[i].Cells[15].InnerText = tab4.Rows[i].Cells[10].InnerText;
                }
                #endregion
                #region 第一个表tab1 工单业务分析 退单数
                for (int i = 2; i <= 8; i++)
                {
                    tab1.Rows[i].Cells[4].InnerText = tab5.Rows[i].Cells[2].InnerText;
                    tab1.Rows[i].Cells[8].InnerText = tab5.Rows[i].Cells[5].InnerText;
                    tab1.Rows[i].Cells[12].InnerText = tab5.Rows[i].Cells[8].InnerText;
                    tab1.Rows[i].Cells[16].InnerText = tab5.Rows[i].Cells[11].InnerText;
                }
                #endregion

                #region 本月业务工单分析 新增 图1
                RadChart1.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart1.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart1.PlotArea.XAxis.Items[2].TextBlock.Text = "企业信息机";
                RadChart1.PlotArea.XAxis.Items[3].TextBlock.Text = "电路租用";
                RadChart1.PlotArea.XAxis.Items[4].TextBlock.Text = "GPRS专线";
                RadChart1.PlotArea.XAxis.Items[5].TextBlock.Text = "短信直连";
                for (int i = 0; i < 6; i++)
                {
                    RadChart1.Series[0].Items[i].YValue = 0;
                    RadChart1.Series[1].Items[i].YValue = 0;
                    RadChart1.Series[2].Items[i].YValue = 0;
                    RadChart1.Series[3].Items[i].YValue = 0;
                }
                RadChart1.Series[0].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[0].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[0].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[0].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[0].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[0].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[1].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[3].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[1].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[3].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[1].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[3].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[1].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[3].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[1].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[3].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[1].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[3].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[2].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[2].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[2].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[2].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[2].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[2].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[3].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[3].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[3].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[3].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[3].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart1.Series[3].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());

                #endregion

                #region 本月业务工单分析 调整 图2
                RadChart2.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart2.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart2.PlotArea.XAxis.Items[2].TextBlock.Text = "企业信息机";
                RadChart2.PlotArea.XAxis.Items[3].TextBlock.Text = "电路租用";
                RadChart2.PlotArea.XAxis.Items[4].TextBlock.Text = "GPRS专线";
                RadChart2.PlotArea.XAxis.Items[5].TextBlock.Text = "短信直连";
                for (int i = 0; i < 6; i++)
                {
                    RadChart2.Series[0].Items[i].YValue = 0;
                    RadChart2.Series[1].Items[i].YValue = 0;
                    RadChart2.Series[2].Items[i].YValue = 0;
                    RadChart2.Series[3].Items[i].YValue = 0;
                }
                RadChart2.Series[0].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[0].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[0].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[0].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[0].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[0].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[1].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[1].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[1].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[1].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[1].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[1].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[2].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[6].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[2].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[6].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[2].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[6].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[2].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[6].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[2].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[6].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[2].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[6].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[3].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[3].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[3].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[3].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[3].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart2.Series[3].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                #endregion

                #region 本月业务工单分析 取消 图3
                RadChart3.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart3.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart3.PlotArea.XAxis.Items[2].TextBlock.Text = "企业信息机";
                RadChart3.PlotArea.XAxis.Items[3].TextBlock.Text = "电路租用";
                RadChart3.PlotArea.XAxis.Items[4].TextBlock.Text = "GPRS专线";
                RadChart3.PlotArea.XAxis.Items[5].TextBlock.Text = "短信直连";
                for (int i = 0; i < 6; i++)
                {
                    RadChart3.Series[0].Items[i].YValue = 0;
                    RadChart3.Series[1].Items[i].YValue = 0;
                    RadChart3.Series[2].Items[i].YValue = 0;
                    RadChart3.Series[3].Items[i].YValue = 0;
                }
                RadChart3.Series[0].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[0].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[0].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[0].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[0].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[0].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[1].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[1].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[1].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[1].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[1].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[1].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[2].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[2].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[2].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[2].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[2].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[2].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[3].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[12].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[3].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[12].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[3].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[12].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[3].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[12].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[3].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[12].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart3.Series[3].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[12].InnerText.Trim().Replace("\r\n", "").Trim());
                #endregion

                #region 本月业务工单分析 总计 图4
                RadChart4.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart4.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart4.PlotArea.XAxis.Items[2].TextBlock.Text = "企业信息机";
                RadChart4.PlotArea.XAxis.Items[3].TextBlock.Text = "电路租用";
                RadChart4.PlotArea.XAxis.Items[4].TextBlock.Text = "GPRS专线";
                RadChart4.PlotArea.XAxis.Items[5].TextBlock.Text = "短信直连";
                for (int i = 0; i < 6; i++)
                {
                    RadChart4.Series[0].Items[i].YValue = 0;
                    RadChart4.Series[1].Items[i].YValue = 0;
                    RadChart4.Series[2].Items[i].YValue = 0;
                    RadChart4.Series[3].Items[i].YValue = 0;
                }
                RadChart4.Series[0].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[13].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[0].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[13].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[0].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[13].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[0].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[13].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[0].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[13].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[0].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[13].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[1].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[15].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[1].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[15].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[1].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[15].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[1].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[15].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[1].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[15].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[1].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[15].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[2].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[14].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[2].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[14].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[2].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[14].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[2].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[14].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[2].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[14].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[2].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[14].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[3].Items[0].YValue = Convert.ToDouble(tab1.Rows[2].Cells[16].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[3].Items[1].YValue = Convert.ToDouble(tab1.Rows[3].Cells[16].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[3].Items[2].YValue = Convert.ToDouble(tab1.Rows[4].Cells[16].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[3].Items[3].YValue = Convert.ToDouble(tab1.Rows[5].Cells[16].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[3].Items[4].YValue = Convert.ToDouble(tab1.Rows[6].Cells[16].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart4.Series[3].Items[5].YValue = Convert.ToDouble(tab1.Rows[7].Cells[16].InnerText.Trim().Replace("\r\n", "").Trim());
                #endregion

                #region 客户需求数统计 图6

                RadChart6.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart6.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart6.PlotArea.XAxis.Items[2].TextBlock.Text = "电路租用";
                RadChart6.PlotArea.XAxis.Items[3].TextBlock.Text = "语音专线";
                RadChart6.PlotArea.XAxis.Items[4].TextBlock.Text = "数据专线";
                RadChart6.PlotArea.XAxis.Items[5].TextBlock.Text = "电路租用";


                for (int i = 0; i < 6; i++)
                {
                    RadChart6.Series[0].Items[i].YValue = 0;
                    RadChart6.Series[1].Items[i].YValue = 0;
                    RadChart6.Series[2].Items[i].YValue = 0;
                    RadChart6.Series[3].Items[i].YValue = 0;
                }
                if (seleMonth.Value == "1")
                {
                    for (int i = 0; i < 3; i++)
                        RadChart6.PlotArea.XAxis.Items[i].TextBlock.Text =
                             "1月" + RadChart6.PlotArea.XAxis.Items[i].TextBlock.Text;
                    for (int i = 3; i < 6; i++)
                        RadChart6.PlotArea.XAxis.Items[i].TextBlock.Text =
                             "12月" + RadChart6.PlotArea.XAxis.Items[i].TextBlock.Text;
                }
                else
                {
                    for (int i = 0; i < 3; i++)
                        RadChart6.PlotArea.XAxis.Items[i].TextBlock.Text = seleMonth.Value + "月" +
                                                                           RadChart6.PlotArea.XAxis.Items[i].TextBlock.
                                                                               Text;
                    for (int i = 3; i < 6; i++)
                        RadChart6.PlotArea.XAxis.Items[i].TextBlock.Text = (Convert.ToInt32(seleMonth.Value) -
                                                                            1) + "月" +
                                                                           RadChart6.PlotArea.XAxis.Items[i].TextBlock.
                                                                               Text;
                }

                RadChart6.Series[0].Items[0].YValue = Convert.ToDouble(tab2.Rows[2].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[0].Items[1].YValue = Convert.ToDouble(tab2.Rows[3].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[0].Items[2].YValue = Convert.ToDouble(tab2.Rows[5].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[0].Items[3].YValue = Convert.ToDouble(tab2.Rows[2].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[0].Items[4].YValue = Convert.ToDouble(tab2.Rows[3].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[0].Items[5].YValue = Convert.ToDouble(tab2.Rows[5].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart6.Series[1].Items[0].YValue = Convert.ToDouble(tab2.Rows[2].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[1].Items[1].YValue = Convert.ToDouble(tab2.Rows[3].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[1].Items[2].YValue = Convert.ToDouble(tab2.Rows[5].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[1].Items[3].YValue = Convert.ToDouble(tab2.Rows[2].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[1].Items[4].YValue = Convert.ToDouble(tab2.Rows[3].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[1].Items[5].YValue = Convert.ToDouble(tab2.Rows[5].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart6.Series[2].Items[0].YValue = Convert.ToDouble(tab2.Rows[2].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[2].Items[1].YValue = Convert.ToDouble(tab2.Rows[3].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[2].Items[2].YValue = Convert.ToDouble(tab2.Rows[5].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[2].Items[3].YValue = Convert.ToDouble(tab2.Rows[2].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[2].Items[4].YValue = Convert.ToDouble(tab2.Rows[3].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[2].Items[5].YValue = Convert.ToDouble(tab2.Rows[5].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart6.Series[3].Items[0].YValue = Convert.ToDouble(tab2.Rows[2].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[3].Items[1].YValue = Convert.ToDouble(tab2.Rows[3].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[3].Items[2].YValue = Convert.ToDouble(tab2.Rows[5].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[3].Items[3].YValue = Convert.ToDouble(tab2.Rows[2].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[3].Items[4].YValue = Convert.ToDouble(tab2.Rows[3].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart6.Series[3].Items[5].YValue = Convert.ToDouble(tab2.Rows[5].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());

                #endregion

                #region 图 5 饼图
                RadChart5.ChartTitle.TextBlock.Text = seleMonth.Value + "月客户需求占比";
                RadChart5.Series[0].Items[0].YValue = Convert.ToDouble(tab1.Rows[8].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart5.Series[0].Items[1].YValue = Convert.ToDouble(tab1.Rows[8].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart5.Series[0].Items[2].YValue = Convert.ToDouble(tab1.Rows[8].Cells[9].InnerText.Trim().Replace("\r\n", "").Trim());
                #endregion

                #region 支撑次数统计 图7

                RadChart7.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart7.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart7.PlotArea.XAxis.Items[2].TextBlock.Text = "电路租用";
                RadChart7.PlotArea.XAxis.Items[3].TextBlock.Text = "语音专线";
                RadChart7.PlotArea.XAxis.Items[4].TextBlock.Text = "数据专线";
                RadChart7.PlotArea.XAxis.Items[5].TextBlock.Text = "电路租用";


                for (int i = 0; i < 6; i++)
                {
                    RadChart7.Series[0].Items[i].YValue = 0;
                    RadChart7.Series[1].Items[i].YValue = 0;
                    RadChart7.Series[2].Items[i].YValue = 0;
                    RadChart7.Series[3].Items[i].YValue = 0;
                }
                if (seleMonth.Value == "1")
                {
                    for (int i = 0; i < 3; i++)
                        RadChart7.PlotArea.XAxis.Items[i].TextBlock.Text =
                            "1月" + RadChart7.PlotArea.XAxis.Items[i].TextBlock.Text;
                    for (int i = 3; i < 6; i++)
                        RadChart7.PlotArea.XAxis.Items[i].TextBlock.Text =
                            "12月" + RadChart7.PlotArea.XAxis.Items[i].TextBlock.Text;
                }
                else
                {
                    for (int i = 0; i < 3; i++)
                        RadChart7.PlotArea.XAxis.Items[i].TextBlock.Text = seleMonth.Value + "月" +
                                                                           RadChart7.PlotArea.XAxis.Items[i].TextBlock.
                                                                               Text;
                    for (int i = 3; i < 6; i++)
                        RadChart7.PlotArea.XAxis.Items[i].TextBlock.Text = (Convert.ToInt32(seleMonth.Value) -
                                                                            1) + "月" +
                                                                           RadChart7.PlotArea.XAxis.Items[i].TextBlock.
                                                                               Text;
                }

                RadChart7.Series[0].Items[0].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[0].Items[1].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[0].Items[2].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[0].Items[3].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[0].Items[4].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[0].Items[5].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart7.Series[1].Items[0].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[1].Items[1].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[1].Items[2].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[1].Items[3].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[1].Items[4].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[1].Items[5].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart7.Series[2].Items[0].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[2].Items[1].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[2].Items[2].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[2].Items[3].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[2].Items[4].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[2].Items[5].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart7.Series[3].Items[0].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[3].Items[1].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[3].Items[2].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[3].Items[3].YValue =
                    Convert.ToDouble(tab3.Rows[2].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[3].Items[4].YValue =
                    Convert.ToDouble(tab3.Rows[3].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart7.Series[3].Items[5].YValue =
                    Convert.ToDouble(tab3.Rows[5].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());

                #endregion

                #region 已完成客户数统计 图8

                RadChart8.PlotArea.XAxis.Items[0].TextBlock.Text = "语音专线";
                RadChart8.PlotArea.XAxis.Items[1].TextBlock.Text = "数据专线";
                RadChart8.PlotArea.XAxis.Items[2].TextBlock.Text = "电路租用";
                RadChart8.PlotArea.XAxis.Items[3].TextBlock.Text = "语音专线";
                RadChart8.PlotArea.XAxis.Items[4].TextBlock.Text = "数据专线";
                RadChart8.PlotArea.XAxis.Items[5].TextBlock.Text = "电路租用";


                for (int i = 0; i < 6; i++)
                {
                    RadChart8.Series[0].Items[i].YValue = 0;
                    RadChart8.Series[1].Items[i].YValue = 0;
                    RadChart8.Series[2].Items[i].YValue = 0;
                    RadChart8.Series[3].Items[i].YValue = 0;
                }
                if (seleMonth.Value == "1")
                {
                    for (int i = 0; i < 3; i++)
                        RadChart8.PlotArea.XAxis.Items[i].TextBlock.Text =
                            "1月" + RadChart8.PlotArea.XAxis.Items[i].TextBlock.Text;
                    for (int i = 3; i < 6; i++)
                        RadChart8.PlotArea.XAxis.Items[i].TextBlock.Text =
                            "12月" + RadChart8.PlotArea.XAxis.Items[i].TextBlock.Text;
                }
                else
                {
                    for (int i = 0; i < 3; i++)
                        RadChart8.PlotArea.XAxis.Items[i].TextBlock.Text = seleMonth.Value + "月" +
                                                                           RadChart8.PlotArea.XAxis.Items[i].TextBlock.
                                                                               Text;
                    for (int i = 3; i < 6; i++)
                        RadChart8.PlotArea.XAxis.Items[i].TextBlock.Text = (Convert.ToInt32(seleMonth.Value) -
                                                                            1) + "月" +
                                                                           RadChart8.PlotArea.XAxis.Items[i].TextBlock.
                                                                               Text;
                }

                RadChart8.Series[0].Items[0].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[0].Items[1].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[0].Items[2].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[0].Items[3].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[0].Items[4].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[0].Items[5].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart8.Series[1].Items[0].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[1].Items[1].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[1].Items[2].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[1].Items[3].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[1].Items[4].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[1].Items[5].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart8.Series[2].Items[0].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[2].Items[1].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[2].Items[2].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[2].Items[3].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[2].Items[4].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[2].Items[5].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart8.Series[3].Items[0].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[3].Items[1].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[3].Items[2].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[3].Items[3].YValue =
                    Convert.ToDouble(tab4.Rows[2].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[3].Items[4].YValue =
                    Convert.ToDouble(tab4.Rows[3].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart8.Series[3].Items[5].YValue =
                    Convert.ToDouble(tab4.Rows[5].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());

                #endregion

                #region 提单质量统计 图9

                RadChart9.PlotArea.XAxis.Items[0].TextBlock.Text = "语音新增";
                RadChart9.PlotArea.XAxis.Items[1].TextBlock.Text = "语音调整";
                RadChart9.PlotArea.XAxis.Items[2].TextBlock.Text = "语音取消";
                RadChart9.PlotArea.XAxis.Items[3].TextBlock.Text = "语音总计";
                RadChart9.PlotArea.XAxis.Items[4].TextBlock.Text = "数据新增";
                RadChart9.PlotArea.XAxis.Items[5].TextBlock.Text = "数据调整";
                RadChart9.PlotArea.XAxis.Items[6].TextBlock.Text = "数据取消";
                RadChart9.PlotArea.XAxis.Items[7].TextBlock.Text = "数据总计";
                RadChart9.PlotArea.XAxis.Items[8].TextBlock.Text = "电路新增";
                RadChart9.PlotArea.XAxis.Items[9].TextBlock.Text = "电路调整";
                RadChart9.PlotArea.XAxis.Items[10].TextBlock.Text = "电路取消";
                RadChart9.PlotArea.XAxis.Items[11].TextBlock.Text = "电路总计";

                for (int i = 0; i < 12; i++)
                {
                    RadChart9.Series[0].Items[i].YValue = 0;
                    RadChart9.Series[1].Items[i].YValue = 0;
                }

                RadChart9.Series[0].Items[0].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[1].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[2].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[3].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart9.Series[0].Items[4].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[5].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[6].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[7].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart9.Series[0].Items[8].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[1].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[9].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[4].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[10].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[7].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[0].Items[11].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[10].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart9.Series[1].Items[0].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[1].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[2].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[3].YValue =
                    Convert.ToDouble(tab5.Rows[2].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart9.Series[1].Items[4].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[5].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[6].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[7].YValue =
                    Convert.ToDouble(tab5.Rows[3].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());

                RadChart9.Series[1].Items[8].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[2].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[9].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[5].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[10].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[8].InnerText.Trim().Replace("\r\n", "").Trim());
                RadChart9.Series[1].Items[11].YValue =
                    Convert.ToDouble(tab5.Rows[5].Cells[11].InnerText.Trim().Replace("\r\n", "").Trim());

                #endregion
            }
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList1.SelectedValue == "0")
                RadChart6.DefaultType = ChartSeriesType.Bar;
            else
            {
                RadChart6.DefaultType = ChartSeriesType.Line;
            }
        }
        protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList2.SelectedValue == "0")
            {
                RadChart1.DefaultType = ChartSeriesType.Bar;
                RadChart2.DefaultType = ChartSeriesType.Bar;
                RadChart3.DefaultType = ChartSeriesType.Bar;
                RadChart4.DefaultType = ChartSeriesType.Bar;
            }
            else
            {
                RadChart1.DefaultType = ChartSeriesType.Line;
                RadChart2.DefaultType = ChartSeriesType.Line;
                RadChart3.DefaultType = ChartSeriesType.Line;
                RadChart4.DefaultType = ChartSeriesType.Line;
            }
        }
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList3.SelectedValue == "0")
                RadChart7.DefaultType = ChartSeriesType.Bar;
            else
            {
                RadChart7.DefaultType = ChartSeriesType.Line;
            }
        }
        protected void DropDownList4_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList4.SelectedValue == "0")
                RadChart8.DefaultType = ChartSeriesType.Bar;
            else
            {
                RadChart8.DefaultType = ChartSeriesType.Line;
            }
        }
        protected void DropDownList5_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList5.SelectedValue == "0")
                RadChart9.DefaultType = ChartSeriesType.Bar;
            else
            {
                RadChart9.DefaultType = ChartSeriesType.Line;
            }
        }
        
    }
}